import * as echarts from 'echarts';
type EChartsOption = echarts.EChartsOption;

export default function barOption5(myChart: echarts.ECharts) {
    return {
        title: {
            text: 'bar Chart5',
            subtext: 'Fake Data',
            left: 'center'
        },
        xAxis: {
            type: 'category',
            data: []
        },
        toolbox: {
            feature: {
                saveAsImage: {}
            }
        },
        yAxis: {
            type: 'value',
            min: 0,
            max: 10,
        },
        series: [
            //设置某个柱子的颜色
            {
                data: [],
                type: 'bar',
                barWidth: "20px",
                itemStyle: {
                    //设置圆角
                    barBorderRadius: [15, 15, 0, 0],
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                        {
                            offset: 0,
                            color: "#02a0ba",
                        },
                        // 百分之100状态之下的颜色值
                        {
                            offset: 1,
                            color: "#f9c01a",
                        },
                    ])
                },
                
            }
        ]
    } as EChartsOption;
}

